﻿Ext.namespace("Swfu");
Ext.namespace("Swfu.BackMgr");

Swfu.BackMgr.MainHeader = function () {
    Swfu.BackMgr.MainHeader.superclass.constructor.call(this);
};

Swfu.BackMgr.MainHeader = Ext.extend(Ext.Panel,
{
    title: '<div style="color:#000;">当前登录工号:' + Cookies.get("jobNo") + '</div>',
    id: 'headerPanel', height: 100, layout: 'column',
    initComponent: function () {
        Ext.apply(this,
        {
            items: [{
                columnWidth:.5, html: '<div class="bgPic"></div>'
            }, {
                columnWidth: .5, html: '<iframe src="ScrollNotices.aspx" frameborder="0" width=100% height=100% allowTransparency="true"></iframe>'
            }, {
                width: 230, height: '100%', items: [
                {
                    layout: 'fit', items: [
                    {
                        id: 'logo-header', layout: 'fit', frame: false, autoHeight: true,
                        html: '<div style="text-align:center;"></div>',
                        tbar: ['风格', {
                            xtype: 'ThemeChange', width: 90
                        },'-',
                        {
                            text: '安全退出', iconCls: 'icon-SysExit',
                            handler: loginOut
                        }]
                    }]
                }]
            }]
        });
        Swfu.BackMgr.MainHeader.superclass.initComponent.apply(this, arguments)
    },
    onRender: function () {
        Swfu.BackMgr.MainHeader.superclass.onRender.apply(this, arguments)
    },
    afterRender: function () {
        Swfu.BackMgr.MainHeader.superclass.afterRender.apply(this, arguments)
    },
    beforeDestroy: function () {
        Ext.Panel.superclass.beforeDestroy.call(this)
    }
});
Ext.reg('mainheader', Swfu.BackMgr.MainHeader);